<template>
  <div>
    <Loading :isLoading="authActionStore.isLoading">
    <div class="flex">
      <Card class="mr-3 w-6">
        <template #title>功能权限</template>
        <template #content>
          <EditForm :businessKey="(route.params.businessKey as string)" />
        </template>
      </Card>

      <Card class="flex-1">
        <template #title>已配置功能权限 <span class="text-base">（菜单栏：{{ route.query.name }}）</span></template>
        <template #content>
          <ConfigAction :businessKey="(route.params.businessKey as string)" />
        </template>
      </Card>
    </div>
  </Loading>
  </div>
</template>

<script lang="ts" setup>
import { useAuthActionStore } from '@/stores/authAction'

import { onMounted, watch, ref } from 'vue';
import { useRoute } from 'vue-router'
import { Card } from '@/utils/primevue'
import Loading from '@/components/Loading/Loading-component'
import EditForm from './components/EditForm.vue'
import ConfigAction from './components/ConfigAction.vue'


const authActionStore = useAuthActionStore()
const route = useRoute()


onMounted(() => {
  authActionStore.queryAuthActionList(route.params.businessKey as string)
})

</script>

<style scoped>

</style>
